import http from "./request.ts"
import qs from 'qs'
// home/brand/list 分页查询推荐品牌
export const homeBrandList = (params: MyHomeBrandListParams): RES<MyHomeBrandListModel> => http.get("/home/brand/list", { params })
// /home/brand/create 添加首页推荐品牌

// home/brand/delete 批量删除推荐品牌
export const homeBranDelete = (params: { ids: string | number }

): RES<MyHomeBrandListModel> => http.post(`/home/brand/delete`, qs.stringify(params))

// home/brand/update/recommendStatus 批量修改推荐品牌状态
export const homeBrandUpdateRecommendStatus = (params: {
    recommendStatus: number;
    ids: any
}): RES<HomeBrandUpdateRecommendStatusParams> => {
    return http.post(`/home/brand/update/recommendStatus`, qs.stringify(params))
}
// home/brand/update/sort/{id} 修改推荐品牌排序
export const homeBranSortByID = (params: { id: string | number, sort: string }

): RES<MyHomeBrandListModel> => http.post(`/home/brand/update/sort/${params.id}?sort=${params.sort}&id=${params.id}`)

